<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="include::head"></head>
<body>
<div style="padding: 20px;">
    <div class=""  id="tree">loding... ...</div>
</div>
<div th:include="include::onload"></div>
<script  th:inline="javascript">
    $(function () {
        //初始化部门tree结构
        $.tree.init("#tree",[[${treePermission}]]);
        //初始化部门点击事件
        $("#tree").bind("activate_node.jstree", function (obj, e) {
            var index = parent.layer.getFrameIndex(window.name);
            parent.$('#parentIds').text(e.node.text);
            parent.$('#parentId').val(e.node.id);
            parent.layer.close(index);
        });
    });
</script>
</body>
</html>